package com.cloudcms.web.service.impl;

import com.cloudcms.web.entity.Admin;
import com.cloudcms.web.entity.Archives;
import com.cloudcms.web.entity.Attachments;
import com.cloudcms.web.entity.Types;
import com.cloudcms.web.mapper.cms.CmsMapper;
import com.cloudcms.web.service.CmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CmsServiceImpl implements CmsService {
    /**
     * 注入dao
     */
    @Autowired
    private CmsMapper cmsMapper;

    @Override
    public List<Admin> selectAdmin(Admin record) {
        return cmsMapper.selectAdmin(record);
    }

    @Override
    public int insertAdmin(Admin record) {
        return cmsMapper.insertAdmin(record);
    }

    @Override
    public int updateAdmin(Admin record) {
        return cmsMapper.updateAdmin(record);
    }

    public List<Archives> selectArchives(Archives record){
        return  cmsMapper.selectArchives(record);
    };
    @Override
    public int insertArchives(Archives record) {
        return cmsMapper.insertArchives(record);
    }
    @Override
    public int updateArchives(Archives record) {
        return cmsMapper.updateArchives(record);
    }

    @Override
    public List<Attachments> selectAttachments(Attachments record){
        return  cmsMapper.selectAttachments(record);
    };
    @Override
    public int insertAttachments(Attachments record) {
        return cmsMapper.insertAttachments(record);
    }
    @Override
    public int deleteAttachments(Attachments record) {
        return cmsMapper.deleteAttachments(record);
    }

    @Override
    public List<Types> selectTypes(Types record){
        return  cmsMapper.selectTypes(record);
    }
    @Override
    public int insertTypes(Types record) {
        return cmsMapper.insertTypes(record);
    }
    @Override
    public int updateTypes(Types record) {
        return cmsMapper.updateTypes(record);
    }

}
